<template>
  <div class="common-layout">
    <!-- <el-container>
      <Top></Top>
      <el-container>
        <SliderBar></SliderBar>
        <el-main>Main</el-main>
      </el-container>
    </el-container> -->

    <el-container>
      <el-header>
        <Top></Top>
      </el-header>
      <el-container>
        <!-- 首页看板不展示左侧菜单栏 用单独的页面显示 -->
        <router-view v-if="$route.path === '/home'"></router-view>
        <template v-else>
          <SliderBar></SliderBar>
          <el-main>Main</el-main>
        </template>

      </el-container>
    </el-container>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import Top from "@/components/common/Top.vue";
import SliderBar from "@/components/common/SliderBar.vue";

export default defineComponent({
  name: "HomeView",
  components: {
    Top,
    SliderBar,
  },
});
</script>
<style scoped lang="scss">
.el-header {
  width: 100%;
  background-color: #027aff;
  color: #fefefe;
  line-height: 60px;
}
.main-content {
  height: calc(100vh - 60px);
  max-height: calc(100vh - 60px);
  overflow: hidden;
  background: #f7f8fa;
}
</style>
